#include "RsGisLibCMDRasterGIS.h"

RsGisLibCMDRasterGIS::RsGisLibCMDRasterGIS(RsgisPortal* Port)
{
	ClientPort = Port;

	rsgisRGISPopuStats = NULL;
	rsgisRGISCopyRAT = NULL;
	rsgisRGISCopyGDALATTCol = NULL;
	rsgisRGISSpatiLoca = NULL;
	rsgisRGISSpatiLocaExt = NULL;
	rsgisRGISPopuRATWithStats = NULL;
	rsgisRGISPopuRATWithPer = NULL;
}

RsGisLibCMDRasterGIS::~RsGisLibCMDRasterGIS()
{
	if (rsgisRGISPopuStats)
		delete(rsgisRGISPopuStats);
	if (rsgisRGISCopyRAT)
		delete(rsgisRGISCopyRAT);
	if (rsgisRGISCopyGDALATTCol)
		delete(rsgisRGISCopyGDALATTCol);
	if (rsgisRGISSpatiLoca)
		delete(rsgisRGISSpatiLoca);
	if (rsgisRGISSpatiLocaExt)
		delete(rsgisRGISSpatiLocaExt);
	if (rsgisRGISPopuRATWithStats)
		delete(rsgisRGISPopuRATWithStats);
	if (rsgisRGISPopuRATWithPer)
		delete(rsgisRGISPopuRATWithPer);

	rsgisRGISPopuStats = NULL;
	rsgisRGISCopyRAT = NULL;
	rsgisRGISCopyGDALATTCol = NULL;
	rsgisRGISSpatiLoca = NULL;
	rsgisRGISSpatiLocaExt = NULL;
	rsgisRGISPopuRATWithStats = NULL;
	rsgisRGISPopuRATWithPer = NULL;
}

void RsGisLibCMDRasterGIS::RGISPopuStats()
{
	rsgisRGISPopuStats = new RsGisLibRGISPopuStats(ClientPort, NULL);
	rsgisRGISPopuStats->show();
}

void RsGisLibCMDRasterGIS::RGISCopyRAT()
{
	rsgisRGISCopyRAT = new RsGisLibRGISCopyRAT(ClientPort, NULL);
	rsgisRGISCopyRAT->show();
}

void RsGisLibCMDRasterGIS::RGISCopyGDALATTCol()
{
	rsgisRGISCopyGDALATTCol = new RsGisLibRGISCopyGDALATTCol(ClientPort, NULL);
	rsgisRGISCopyGDALATTCol->show();
}

void RsGisLibCMDRasterGIS::RGISSpatiLoca()
{
	rsgisRGISSpatiLoca = new RsGisLibRGISSpatiLoca(ClientPort, NULL);
	rsgisRGISSpatiLoca->show();
}

void RsGisLibCMDRasterGIS::RGISSpatiLocaExt()
{
	rsgisRGISSpatiLocaExt = new RsGisLibRGISSpatiLocaExt(ClientPort, NULL);
	rsgisRGISSpatiLocaExt->show();
}

void RsGisLibCMDRasterGIS::RGISPopuRATWithStats()
{
	rsgisRGISPopuRATWithStats = new RsGisLibRGISPopuRATWithStats(ClientPort, NULL);
	rsgisRGISPopuRATWithStats->show();
}

void RsGisLibCMDRasterGIS::RGISPopuRATWithPer()
{
	rsgisRGISPopuRATWithPer = new RsGisLibRGISPopuRATWithPer(ClientPort, NULL);
	rsgisRGISPopuRATWithPer->show();
}